﻿using AttributeRouting.Web.Http;
//using log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Water.Model;

namespace Water.RestService.Controllers
{
    /// <summary>
    /// 大口径阀门堆没记录控制器
    /// </summary>
    public class BigValvePileOfNoController : ApiController
    {
        private BigValvePileQuery bvpq;
        private BigValvePileOfNo bvon;

        [POST("GetBigValvePileOfNos")]
        public IList<BigValvePileQuery> PostGetBigValvePileOfNos(BigValveZMCondition bvzm)
        {
            bvpq = new BigValvePileQuery();
            return bvpq.GetBigValvePileOfNo(bvzm);
        }
        /*
        [POST("GetBigValvePileOfNosCount")]
        public int PostGetBigValvePileOfNosCount(BigValvePileOfNo info)
        {
            var where = BigValvePileOfNoWhere(info);
            int count = rep.LoadCount(where);
            return count;
        }
        */

        [POST("AddBigValvePileOfNo")]
        public bool PostAddBigValvePileOfNo(BigValvePileOfNo info)
        {
            info.MRNO = BuilderMrno.GetMrnoFortbl("Tbt_BigValvePileOfNo");
            bvon = new BigValvePileOfNo();
            bool result = bvon.AddBigValvePileOfNo(info) > 0 ? true : false;
            return result;
        }

        /*
        [POST("EditBigValvePileOfNo")]
        public bool PostEditBigValvePileOfNo(BigValvePileOfNo info)
        {
            bool result = rep.Edit(info);
            return result;
        }

        [GET("DeleteBigValvePileOfNo/{code}")]
        public bool GetDeleteBigValvePileOfNo(string code)
        {
            bool result = rep.Delete(code);
            return result;
        }

        [GET("GetBigValvePileOfNo/{code}")]
        public BigValvePileOfNo GetBigValvePileOfNo(string code)
        {
            var result = rep.Get(code);
            return result;
        }
         * */
    }
}
